home *** CD-ROM | disk | FTP | other *** search
Wrap
-- card: 13724 from stack: in.3r -- bmap block id: 41257 -- flags: 0000 -- background id: 14090 -- name: Self Naming Button -- part 1 (field) -- low flags: 00 -- high flags: 0002 -- rect: left=102 top=47 right=176 bottom=413 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 2 (button) -- low flags: 00 -- high flags: A004 -- rect: left=81 top=187 right=219 bottom=203 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Example 1 ----- HyperTalk script ----- on mouseUp if the optionkey is down then ask "what do you want to name this button?" if it is empty then beep else set the name of the target to it end if else -- --your normal mouseup script goes in here -- end if end mouseUp -- part 8 (button) -- low flags: 00 -- high flags: A000 -- rect: left=81 top=238 right=270 bottom=203 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Example 1 ----- HyperTalk script ----- on mouseUp if the optionkey is down then ask "what do you want to name this button?" if it is empty then beep else set the name of the target to it end if else -- --your normal mouseup script goes in here -- end if end mouseUp -- part 9 (button) -- low flags: 00 -- high flags: A002 -- rect: left=211 top=238 right=270 bottom=333 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Example 1 ----- HyperTalk script ----- on mouseUp if the optionkey is down then ask "what do you want to name this button?" if it is empty then beep else set the name of the target to it end if else -- --your normal mouseup script goes in here -- end if end mouseUp -- part 10 (button) -- low flags: 00 -- high flags: A006 -- rect: left=212 top=188 right=220 bottom=334 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Example 1 ----- HyperTalk script ----- on mouseUp if the optionkey is down then ask "what do you want to name this button?" if it is empty then beep else set the name of the target to it end if else -- --your normal mouseup script goes in here -- end if end mouseUp -- part 11 (button) -- low flags: 00 -- high flags: A003 -- rect: left=362 top=229 right=278 bottom=454 -- title width / last selected line: 0 -- icon id / first selected line: 2002 / 2002 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Example 1 ----- HyperTalk script ----- on mouseUp if the optionkey is down then ask "what do you want to name this button?" if it is empty then beep else set the name of the target to it end if else -- --your normal mouseup script goes in here -- end if end mouseUp -- part 12 (button) -- low flags: 00 -- high flags: A005 -- rect: left=351 top=189 right=221 bottom=473 -- title width / last selected line: 0 -- icon id / first selected line: 21240 / 21240 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Example 1 ----- HyperTalk script ----- on mouseUp if the optionkey is down then ask "what do you want to name this button?" if it is empty then beep else set the name of the target to it end if else -- --your normal mouseup script goes in here -- end if end mouseUp -- part contents for background part 5 ----- text ----- 3 -- part contents for background part 12 ----- text ----- Self Naming Button -- part contents for card part 1 ----- text ----- When you click on this button with the option key held down, you will be asked to rename it. This will allow your users to rename buttons without knowing anything about Hypercard (example 1). Another way to do this would be to check if the button currently has a name when it is clicked, and allow the user to rename it if it doesn't. -- part contents for background part 13 ----- text ----- Buttons